ORACLE_HOME = /u01/app/oracle/product/11.2.0.3
ORACLE_LIB = $(ORACLE_HOME)/lib

OCI_DEMO_H = $(ORACLE_HOME)/rdbms/demo
OCI_PUBLIC_H = $(ORACLE_HOME)/rdbms/public

CC = gcc34
CPP = g++
OBJS = ociuldr2.o
PROG = ociuldr2

all:$(PROG)

$(PROG):$(OBJS)
	@echo "[link] ... "
	@echo "---------------------"
	$(CC) -g -o $(PROG) $(OBJS) -L$(ORACLE_LIB) -lclntsh
	@echo

clean:
	rm -f $(PROG) $(OBJS)


.SUFFIXES: .cpp .c

.c.o:
	@echo "[$*.o]"
	@echo "---------------------"
	$(CC) -g -o $*.o -I$(OCI_DEMO_H) -I$(OCI_PUBLIC_H) -c $*.c
	@echo
